package democlone;

public class Test{

    public static void main(String[] args) throws CloneNotSupportedException {
        Person p1 = new Person(21);
        Person p2 = (Person)p1.clone();

        System.out.println(p1.m.money);
        System.out.println(p2.m.money);

        System.out.println("*****************");
        p2.m.money = 100;
        //深拷贝
        System.out.println(p1.m.money);
        System.out.println(p2.m.money);


    }

}
